<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>fmwurlie</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" />
    <link rel="prev" href="fmvoice.html" title="fmvoice" />
    <link rel="next" href="fof.html" title="fof" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">fmwurlie</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="fmvoice.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="fof.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry">
      <a id="fmwurlie"></a>
      <div class="titlepage"></div>
      <a id="IndexFmwurlie" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">fmwurlie</span>
        </h2>
        <p>fmwurlie — 
      Uses FM synthesis to create a Wurlitzer electric piano sound.
          </p>
      </div>
      <div class="refsect1">
        <a id="idp109932768"></a>
        <h2>Description</h2>
        <p>
      Uses FM synthesis to create a Wurlitzer electric piano sound. It comes from a family of FM sounds, all using 4 basic oscillators and various architectures, as used in the TX81Z synthesizer.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp109934336"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">ares <span class="command"><strong>fmwurlie</strong></span> kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, ifn3, \
      ifn4, ivfn</pre>
      </div>
      <div class="refsect1">
        <a id="idp109936560"></a>
        <h2>Initialization</h2>
        <p>
      All these opcodes take 5 tables for initialization. The first 4 are the basic inputs and the last is the low frequency oscillator (LFO) used for vibrato. The last table should usually be a sine wave.
    </p>
        <p>
      The initial waves should be:
      </p>
        <div class="itemizedlist">
          <ul class="itemizedlist" style="list-style-type: disc; ">
            <li class="listitem">
              <p><span class="emphasis"><em>ifn1</em></span> -- sine wave</p>
            </li>
            <li class="listitem">
              <p><span class="emphasis"><em>ifn2</em></span> -- sine wave</p>
            </li>
            <li class="listitem">
              <p><span class="emphasis"><em>ifn3</em></span> -- sine wave</p>
            </li>
            <li class="listitem">
              <p><span class="emphasis"><em>ifn4</em></span> -- <a class="ulink" href="examples/fwavblnk.aiff" target="_top"><em class="citetitle">fwavblnk.aiff</em></a></p>
            </li>
          </ul>
        </div>
        <p>
    </p>
        <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
          <table border="0" summary="Note: Note">
            <tr>
              <td rowspan="2" align="center" valign="top" width="25">
                <img alt="[Note]" src="images/note.png" />
              </td>
              <th align="left">Note</th>
            </tr>
            <tr>
              <td align="left" valign="top">
                <p>
        The file <span class="quote">“<span class="quote">fwavblnk.aiff</span>”</span> is also available at <a class="ulink" href="ftp://ftp.cs.bath.ac.uk/pub/dream/documentation/sounds/modelling/" target="_top"><em class="citetitle">ftp://ftp.cs.bath.ac.uk/pub/dream/documentation/sounds/modelling/</em></a>.
      </p>
              </td>
            </tr>
          </table>
        </div>
      </div>
      <div class="refsect1">
        <a id="idp109945680"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>kamp</em></span> -- Amplitude of note.
    </p>
        <p>
      <span class="emphasis"><em>kfreq</em></span> -- Frequency of note played.
    </p>
        <p>
      <span class="emphasis"><em>kc1, kc2</em></span> -- Controls for the synthesizer:
      </p>
        <div class="itemizedlist">
          <ul class="itemizedlist" style="list-style-type: disc; ">
            <li class="listitem">
              <p><span class="emphasis"><em>kc1</em></span> -- Mod index 1</p>
            </li>
            <li class="listitem">
              <p><span class="emphasis"><em>kc2</em></span> -- Crossfade of two outputs</p>
            </li>
            <li class="listitem">
              <p><span class="emphasis"><em>Algorithm</em></span> -- 5</p>
            </li>
          </ul>
        </div>
        <p>
    </p>
        <p>
      <span class="emphasis"><em>kvdepth</em></span> -- Vibrator depth
    </p>
        <p>
      <span class="emphasis"><em>kvrate</em></span> -- Vibrator rate
    </p>
      </div>
      <div class="refsect1">
        <a id="idp109953840"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the fmwurlie opcode. It uses the file <a class="ulink" href="examples/fmwurlie.csd" target="_top"><em class="citetitle">fmwurlie.csd</em></a>, and <a class="ulink" href="examples/fwavblnk.aiff" target="_top"><em class="citetitle">fwavblnk.aiff</em></a>.

      </p>
        <div class="example">
          <a id="idp109956544"></a>
          <p class="title">
            <strong>Example 305. Example of the fmwurlie opcode.</strong>
          </p>
          <div class="example-contents">
            <p>See the sections <a class="link" href="UsingRealTime.html" title="Real-Time Audio"><em class="citetitle">Real-time Audio</em></a> and <a class="link" href="CommandFlags.html" title="Csound command line"><em class="citetitle">Command Line Flags</em></a> for more information on using command line flags.</p>
            <pre class="programlisting">
<span class="csdtag">&lt;CsoundSynthesizer&gt;</span>
<span class="csdtag">&lt;CsOptions&gt;</span>
<span class="comment">; Select audio/midi flags here according to platform</span>
-odac     <span class="comment">;;;realtime audio out</span>
<span class="comment">;-iadc    ;;;uncomment -iadc if realtime audio input is needed too</span>
<span class="comment">; For Non-realtime ouput leave only the line below:</span>
<span class="comment">; -o fmwurlie.wav -W ;;; for file output any platform</span>
<span class="csdtag">&lt;/CsOptions&gt;</span>
<span class="csdtag">&lt;CsInstruments&gt;</span>

<span class="ohdr">sr</span> <span class="op">=</span> 44100
<span class="ohdr">ksmps</span> <span class="op">=</span> 32  
<span class="ohdr">nchnls</span> <span class="op">=</span> 2
<span class="ohdr">0dbfs</span>  <span class="op">=</span> 1

<span class="oblock">instr</span> 1

kfreq <span class="op">=</span> 440
kc1 <span class="op">=</span> p4
kc2 <span class="op">=</span> 1
kvdepth <span class="op">=</span> 0.05
kvrate <span class="op">=</span> 6
ifn1 <span class="op">=</span> 1
ifn2 <span class="op">=</span> 1
ifn3 <span class="op">=</span> 1
ifn4 <span class="op">=</span> 2
ivfn <span class="op">=</span> 1

asig <span class="opc">fmwurlie</span> .5, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, ifn3, ifn4, ivfn
     <span class="opc">outs</span> asig, asig

<span class="oblock">endin</span>
<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>
<span class="comment">; sine wave</span>
<span class="stamnt">f</span> 1 0 32768 10 1
<span class="comment">; audio file</span>
<span class="stamnt">f</span> 2 0 256 1 "<span class="stamnt">f</span>wavblnk.ai<span class="stamnt">f</span><span class="stamnt">f</span>" 0 0 0

<span class="stamnt">i</span> 1 0 3 6
<span class="stamnt">i</span> 1 + 3 30
<span class="stamnt">i</span> 1 + 2 60
<span class="stamnt">e</span>
<span class="csdtag">&lt;/CsScore&gt;</span>
<span class="csdtag">&lt;/CsoundSynthesizer&gt;</span>
</pre>
          </div>
        </div>
        <p><br class="example-break" />
    </p>
      </div>
      <div class="refsect1">
        <a id="idp109960864"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="fmb3.html" title="fmb3"><em class="citetitle">fmb3</em></a>,
      <a class="link" href="fmbell.html" title="fmbell"><em class="citetitle">fmbell</em></a>,
      <a class="link" href="fmmetal.html" title="fmmetal"><em class="citetitle">fmmetal</em></a>,
      <a class="link" href="fmpercfl.html" title="fmpercfl"><em class="citetitle">fmpercfl</em></a>,
      <a class="link" href="fmrhode.html" title="fmrhode"><em class="citetitle">fmrhode</em></a>
    </p>
      </div>
      <div class="refsect1">
        <a id="idp109966816"></a>
        <h2>Credits</h2>
        <p>
      </p>
        <table border="0" summary="Simple list" class="simplelist">
          <tr>
            <td>Author: John ffitch (after Perry Cook)</td>
          </tr>
          <tr>
            <td>University of Bath, Codemist Ltd.</td>
          </tr>
          <tr>
            <td>Bath, UK</td>
          </tr>
        </table>
        <p>
    </p>
        <p>New in Csound version 3.47</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="fmvoice.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="OpcodesTop.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="fof.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">fmvoice </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> fof</td>
        </tr>
      </table>
    </div>
  </body>
</html>
